package game;

import javax.swing.*;
import java.awt.*;
import java.awt.event.KeyEvent;

public class PlayPanel extends JPanel {
    private Play[] plays;//待绘制的元素
    private Image image;

    public PlayPanel(Play... plays){
        this.plays=plays;
    }

    public void paint(Graphics g){
        super.paint(g);
        for(Play play : plays){
        g.drawImage(play.getImage(),play.getX(),play.getY(),play.getWidth(),play.getHeight(),this);
    }
}

}

